﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AiFrame.Base.Core.Plugins;
using AiFrame.InterfaceLib.Data.Access;
using AiFrame.InterfaceLib.Data.Provider;
using AiFrame.InterfaceLib.Plugins;

namespace AiFrame.Base.Core
{
    public class DefaultComponentFactory: IComponentFactory
    {
        public IDatabaseConnection DatabaseConnection
        {
            get { return AiFrame.Base.Core.Data.Access.DatabaseConnection.Instance; }
        }

        public IDbProviderRegistration DbProviderRegistration
        {
            get { return Plugins.ProviderRegistration.Instance; }
        }

        public IPluginManager PluginManager
        {
            get { return PluginManagerLoader.Instance().GetPluginManager(); }
        }

        public IFactoryManager FactoryManager
        {
            get { return Plugins.FactoryManager.Instance; }
        }
    }
}
